<?php

/*
 * comment here
 */
function saveResourceLang($key,$val,$path ){   
	$GLOBALS['curtlang']==""?$get_current_lang='en-US':$get_current_lang=$GLOBALS['curtlang'];   
	//Create query
	$qry="INSERT INTO `pcshop`.`tbl_resource_language` (
            `resource_id` ,
            `resource_code` ,
            `res_key` ,
            `res_value` ,
            `res_module` ,
            `res_meta_field` ,
            `res_date_modify`
            )
            VALUES (
            NULL , '$get_current_lang', '$key', '$val', '$module' , NULL , NULL
            ) ";
	$result=mysql_query($qry);
	if(dbQuery($result) == 1) 
	{
		//
	}
	else
	{
		//
	}
	
	
}
/*
 * comment here
 */
function getResourceLang($key,$langcode ){   	
	//Create query
	$qry="SELECT `res_value` FROM `tbl_resource_language` WHERE `res_key`='$key' and `resource_code`='$langcode'";  
	$result=mysql_query($qry);
	if(mysql_num_rows($result) == 1) 
	{
		$langValue = mysql_fetch_assoc($result);
		return $langValue["res_value"];
	}
	else
	{
		return "resEmpty";
	}
	
	
}
?>